import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/lib/locale/lang/zh-cn";
import "element-plus/theme-chalk/dark/css-vars.css";
import "nprogress/nprogress.css";
import { createPinia } from "pinia";

import "tailwindcss/tailwind.css";
import { createApp } from "vue";
import App from "./App.vue";
import "./assets/main.css";
import i18n from "./locales/i18n";
import router from "./router/index";

const app = createApp(App);
app.use(createPinia());
app.use(router);
app.use(ElementPlus, {
  locale: zhCn
});
document.documentElement.classList.remove("dark");


// 如果当地时间是夜晚
if (new Date().getHours() > 18 && new Date().getHours() < 6) {
  document.documentElement.classList.add("dark");
}

app.use(i18n);
app.mount("#app");
